package com.example.hotelmanagement.common.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotEmpty;

/**
 * @author: zhanghp
 * @date: 2022-07-03 0:12
 */
@Data
@Validated
@Component
public class WebProperties {

    /**
     * rest包下统一前缀
     */
    Api api = new Api("api", "**.rest.**");

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Api {

        @NotEmpty
        private String prefix;

        @NotEmpty
        private String controllerPath;
    }

}
